import { Get,Post,Put,Delete } from "../utils/axios";
import { md5 } from "md5js";

// 用户个人信息查询
export const getById =  (params:any) => {
    let ret =  Get('user/'+params.id);
    return ret;
};
// 用户信息查询
export const findAllUser =  (params:object) => {
    let ret =  Get('user',params);
    return ret;
};
// 用户(添加|创建)方法
export const addUser = async (params:object) => {
    let ret = await Post('user',params);
    return ret;
};
// 用户(修改|更新)方法
export const updateUser =  (params:object) => {
    let ret =  Put('user',params);
    return ret;
};
// 用户(修改|更新)方法
export const updatePwd =  (params:object) => {
    let ret =  Put('user/pwd',params);
    return ret;
};
// 用户(修改|更新)方法
export const deleteUser =  (params:any) => {
    let ret =  Delete('user/'+params.id);
    return ret;
};